#ifndef CPAINTER_H_
#define CPAINTER_H_

#include <e32cmn.h>
#include "messagecaller.h"

class CFbsBitmap;
class CImageHandler;

typedef struct IMAGEDATA
{
	IMAGEDATA()
	{iBitmap = 0;};
	CFbsBitmap* iBitmap;//actual
	int margin_top;
	int margin_bottom;
	int margin_left;
	int margin_right;
};

class CPainter : public MImageHandlerCallback
{
public:
	CPainter();
	virtual ~CPainter();
public:
	void Draw(CBitmapContext& aGc, TRect& aClipRect);
	void LoadFileL(const TDesC& aFileName);
protected:
	void ImageOperationComplete(TInt aError);	
private:
	CImageHandler* iImageHandler; 
	RArray<IMAGEDATA*> iImages;
};

#endif /*CPAINTER_H_*/
